<template>
    <div class = "baseaccount">
         <el-container>
        <el-container>
        <el-main>
            <div class = "Box-wrapper">
                <el-breadcrumb separator="/">
                <el-breadcrumb-item style="font-weight: bold;cursor:pointer" :to="{ path: 'Addbase' }">基地管理</el-breadcrumb-item>
                <el-breadcrumb-item  @click.native = "goBack">账户管理</el-breadcrumb-item>
                </el-breadcrumb>
                <!-- <el-select style="float:right" v-model="value" placeholder="请选择区域">
                </el-select> -->
                <div class = "Haed" style="float:right">
                  <el-button  @click = "newly">新增</el-button>
                  </div>
                <el-table
                :data="tableData"
                style="width: 100%">
                <el-table-column
                    prop="id"
                    align="center"
                    label="ID">
                </el-table-column>
                <el-table-column
                    prop="account"
                    align="center"
                    label="账号">
                </el-table-column>
                <el-table-column
                    prop="name"
                    label="姓名"
                    align="center"
                  >
                </el-table-column>
                <el-table-column
                    prop="createdAt"
                    label="创建日期"
                    align="center"
                  >
                </el-table-column>
                <!-- <el-table-column
                    prop="gender"
                    label="性别"
                    align="center"
                    width="180">
                </el-table-column> -->
                </el-table>
            </div>
        </el-main>
        </el-container>
        </el-container>
    </div>
</template>
<script>
import transitionTime from '../../transitionTime'
export default {
    data(){
        return{
        tableData: [],
        loading:false,
        baseId:'',
        Boole:0,
        }
    },
    created() {
        this.List()
    },
    methods:{
    List(){
        this.baseId = this.$route.query.form
        if(this.baseId){
            this.$api.Basetoaddordelete.AdministratorList(this.baseId).then(res => {
                this.tableData = res.data
                for(let i = 0; i<this.tableData.length; i++){
                    this.tableData[i].createdAt = transitionTime(this.tableData[i].createdAt)
                }
            })
        }
    },
    goBack(){
        this.$router.push('Addbase')
    },
    //新增
    newly(){
        this.$router.push({path:'baseaccountadd',query:{item:this.baseId}})
    },
    //点击下拉列表
    area(){

    },
    // 删除
    }
}
</script>
<style scoped>
    
</style>

